public class MythreadDemo03 {
    public static void main(String[] args) {
        Mythread t1 = new Mythread("Car");
        Mythread t2 = new Mythread("Express");
        Mythread t3 = new Mythread("Plane");

        t1.setPriority(1);  //设置线程优先级
        t2.setPriority(5);  //线程优先级为一个 1 - 10 的整数
        t3.setPriority(10);
        t1.start();
        t2.start();
        t3.start();
        //优先级高的线程补一刀先执行，优先级低的线程也不一定后执行，优先级的高低只代表获取CPU的概率。
        //优先级越高，获取CPU的概率越大。
    }
}
